//
// Created by Kai Wang on 23-11-22.
//

#ifndef OPENCOS_ITEM_H
#define OPENCOS_ITEM_H

#include "item/item_category.h"

#include <string>
#include <string_view>
#include <vector>

class Item
{
public:
    Item() = default;

    explicit Item(
        std::string &name,                                   //
        ItemCategory item_category = ItemCategory::INVALID,  //
        std::string  description   = "",                     //
        float        price         = -1,                     //
        float        points        = -1,                     //
        int          sells         = -1                      //
    );

    [[nodiscard]] std::string  get_name() const;
    [[nodiscard]] ItemCategory get_category() const;
    [[nodiscard]] std::string  get_description() const;
    [[nodiscard]] float        get_price() const;
    [[nodiscard]] float        get_points() const;
    [[nodiscard]] int          get_sells() const;
    void                       set_name(std::string &name);

private:
    ItemCategory category_ = ItemCategory::INVALID;  // 种类
    std::string  name_;                              // 名称
    float        price_ {};                          // 价格
    std::string  description_;                       // 菜品说明
    float        points_ {};                         // 菜品评分
    int          sells_ {};                          // 售出数量
};

#endif  // OPENCOS_ITEM_H
